#获取入库单
import json
from flask import request
from db_client import *

def get_entry():
        entrys = []
        re_id = request.args.get('search')
        results = mysql_client.get_entry(re_id)
        for result in results:
                t = {
                        "count" : result[0],
                        "item_id" : result[1],
                        "date" : result[2],
                        "order_id" : result[3],
                        "report_id" : result[4],
                        "storager_id" : result[5]
                }
                entrys.append(t)
        data = entrys
        return json.dumps(data,ensure_ascii=False)